package com.wll.ec.fast.main.personal.settings;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.SimpleClickListener;
import com.wll.ec.core.delegates.EcBaseDelegate;
import com.wll.ec.fast.main.personal.list.ListBean;

/**
 * created by detachment on 2020/3/26
 */
public class SettingsClickListener extends SimpleClickListener {

    private final EcBaseDelegate DELEGATE;

    public SettingsClickListener(EcBaseDelegate delegate) {
        this.DELEGATE = delegate;
    }

    @Override
    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
        final ListBean bean = (ListBean) baseQuickAdapter.getData().get(position);
        if (bean.getDelegate() != null) {
            DELEGATE.getSupportDelegate().start(bean.getDelegate());
        }
    }

    @Override
    public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) {

    }

    @Override
    public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {

    }

    @Override
    public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {

    }
}
